package com.party.admin.web.controller.system;

import com.party.admin.biz.system.SystemBizService;
import com.party.admin.web.dto.AjaxResult;
import com.party.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 系统控制器
 *
 * @author yifeng
 * @date 2018/7/10 0010
 * @time 上午 11:34
 */
@Controller
@RequestMapping("/system/system")
public class SystemController {
    @Autowired
    private SystemBizService systemBizService;

    @ResponseBody
    @RequestMapping("updateTableCollate")
    public AjaxResult updateTableCollate() {
        String msg = systemBizService.updateCollate();
        if (StringUtils.isEmpty(msg)) {
            return AjaxResult.success();
        } else {
            return AjaxResult.error(msg);
        }
    }
}
